const Router = require('koa-router');
const {db, Op,QueryTypes } = require("../../models/db");
const tool = require("../../tools/tool");
const router = new Router();

// 删除购物车
router.post('/zd/delCart', async ctx => {
    let usr = ctx.user
    let tenantId = usr.tenantId
    let id = ctx.request.body.id
    let unit = ctx.request.body.unit
    await db.query(`delete from cart_zd where tenantId=${tenantId} and invId=${id} and unit='${unit}' `)
    return ctx.suc('')
})

module.exports = router;
